package com.lvmama.pangolin.enums;

public enum CommonStringType {

    /*IP状态*/
    ON("1", "有效"),
    OFF("0", "无效"),
    
    

    /*竞品公司代码*/
    ALL_C_CODE("ALL_C_CODE","ALL"),
    XC("XC_C_CODE","XC"),
    TC("TC_C_CODE","TC"),
    TN("TN_C_CODE","TN"),
    QNL("QNR_C_CODE","QNL"),
    YL("YL_C_CODE","YL"),

    /*日志错误代码*/
    ALL("ALL","所有类型"),
    BLACKIP("A","黑名单"),
    BADIP("B","ip不可用"),
    WAPCHANGE("C","网站结构更改"),
    EXCEPTIONNOEND("D","代码异常程序未终止"),
    EXCEPTIONEND("E","代码异常程序终止"),
    GRABERROR("F","抓取任务生成异常"),
    
    /*timer状态代码 */
    TIMER_STATUS_0("0","初始"),
    TIMER_STATUS_1("1","待处理"),
    TIMER_STATUS_2("2","处理中"),
    TIMER_STATUS_3("3","异常"),
    TIMER_STATUS_4("4","挂起"),
    TIMER_STATUS_5("5","成功"),
    TIMER_STATUS_6("6","强制成功");
    
    
    
    
    private String value;
    private String showName;

    private CommonStringType(String value, String showName) {
        this.value = value;
        this.showName = showName;
    }

    public String getShowName() {
        return showName;
    }

    public String getValue() {
        return value;
    }


    /*IP状态*/
    public static CommonStringType[] getOffOnType() {
        CommonStringType[] statusTypeArr = new CommonStringType[2];
        statusTypeArr[0] = CommonStringType.ON;
        statusTypeArr[1] = CommonStringType.OFF;
        return statusTypeArr;
    }

    /*竞品公司代码*/
    public static CommonStringType[] getBlackIPType() {
        CommonStringType[] statusTypeArr = new CommonStringType[5];
        statusTypeArr[0] = CommonStringType.ALL_C_CODE;
        statusTypeArr[1] = CommonStringType.XC;
        statusTypeArr[2] = CommonStringType.TC;
        statusTypeArr[3] = CommonStringType.TN;
        statusTypeArr[4] = CommonStringType.QNL;
        return statusTypeArr;
    }

    
    /*错误日志代码*/
    public static CommonStringType[] getErrorLogType() {
        CommonStringType[] statusTypeArr = new CommonStringType[7];
        statusTypeArr[0] = CommonStringType.ALL;
        statusTypeArr[1] = CommonStringType.BLACKIP;
        statusTypeArr[2] = CommonStringType.BADIP;
        statusTypeArr[3] = CommonStringType.WAPCHANGE;
        statusTypeArr[4] = CommonStringType.EXCEPTIONNOEND;
        statusTypeArr[5] = CommonStringType.EXCEPTIONEND;
        statusTypeArr[6] = CommonStringType.GRABERROR;
        return statusTypeArr;
    }

    
    /*错误日志代码*/
    public static CommonStringType[] getTimerStatusType() {
        CommonStringType[] statusTypeArr = new CommonStringType[7];
        statusTypeArr[0] = CommonStringType.TIMER_STATUS_0;
        statusTypeArr[1] = CommonStringType.TIMER_STATUS_1;
        statusTypeArr[2] = CommonStringType.TIMER_STATUS_2;
        statusTypeArr[3] = CommonStringType.TIMER_STATUS_3;
        statusTypeArr[4] = CommonStringType.TIMER_STATUS_4;
        statusTypeArr[5] = CommonStringType.TIMER_STATUS_5;
        statusTypeArr[6] = CommonStringType.TIMER_STATUS_6;
        return statusTypeArr;
    }

 

    
}
